home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / SpellThis.dxr / Internal_7_lil tile.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  2.0 KB  |  80 lines

  1. property pSprite, spriteNum, pchar, ptilelist, ptilelist2, pquestionnum, pnorm, pselect, pdown, myques, plist2
  2. global gtiles, gblue, gsel, lasttile, currentscope
  3.  
  4. on getPropertyDescriptionList me
  5.   return [#ptilelist2: [#comment: "ppp", #format: #string, #default: "[]"]]
  6. end
  7.  
  8. on beginSprite me
  9.   pSprite = sprite(spriteNum)
  10.   gtiles.add(pSprite)
  11.   plist2 = ptilelist2.value
  12.   init()
  13.   if gtiles.count = (15 * 15) then
  14.     createPuzzle()
  15.   end if
  16. end
  17.  
  18. on init me
  19.   pnorm = pSprite.member
  20.   pdown = member(pSprite.member.name & "1")
  21.   pselect = member(pSprite.member.name & "2")
  22. end
  23.  
  24. on mouseDown me
  25. end
  26.  
  27. on moveit me, which
  28.   if which = #left then
  29.     pSprite.member = pselect
  30.     if ptilelist.findPos(pSprite) > 1 then
  31.       gsel = ptilelist[ptilelist.findPos(pSprite) - 1]
  32.     else
  33.       gsel = ptilelist[ptilelist.count]
  34.     end if
  35.   else
  36.     if which = #right then
  37.       pSprite.member = pselect
  38.       if ptilelist.findPos(pSprite) < ptilelist.count then
  39.         gsel = ptilelist[ptilelist.findPos(pSprite) + 1]
  40.       else
  41.         gsel = ptilelist[1]
  42.       end if
  43.     else
  44.       if which = #up then
  45.         pSprite.member = pselect
  46.         if ptilelist2.findPos(pSprite) > 1 then
  47.           gsel = ptilelist2[ptilelist2.findPos(pSprite) - 1]
  48.         else
  49.           gsel = ptilelist2[ptilelist2.count]
  50.         end if
  51.       else
  52.         if which = #ldo then
  53.           pSprite.member = pselect
  54.           if ptilelist2.findPos(pSprite) < ptilelist2.count then
  55.             gsel = ptilelist2[ptilelist2.findPos(pSprite) + 1]
  56.           else
  57.             gsel = ptilelist2[1]
  58.           end if
  59.         end if
  60.       end if
  61.     end if
  62.   end if
  63.   gsel.member = gsel.pdown
  64. end
  65.  
  66. on proceed me
  67.   if currentscope = #across then
  68.     pSprite.member = pselect
  69.     if ptilelist.findPos(pSprite) < ptilelist.count then
  70.       gsel = ptilelist[ptilelist.findPos(pSprite) + 1]
  71.     end if
  72.   else
  73.     pSprite.member = pselect
  74.     if ptilelist2.findPos(pSprite) < ptilelist2.count then
  75.       gsel = ptilelist2[ptilelist2.findPos(pSprite) + 1]
  76.     end if
  77.   end if
  78.   gsel.member = gsel.pdown
  79. end
  80.